package tjs.org.springLoader.config;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

public class RestartApplicationListener implements ApplicationListener<ContextRefreshedEvent> {

    private AutoReloaderProperties autoReloaderProperties;

    public RestartApplicationListener(AutoReloaderProperties autoReloaderProperties) {
        this.autoReloaderProperties = autoReloaderProperties;
    }

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        DoAutoReloader doAutoReloader = new DoAutoReloader(event.getApplicationContext().getClassLoader(), autoReloaderProperties.getClassPathes());

    }
}